package com.jdl.iscm.common;

import com.jdl.iscm.entity.proterties.ReplenishXpathProperties;

/**
 * @Author: Ran
 * @Date: 2021/8/21
 **/

public class JoinUtil {

    /**
     * 用于拼接common text xpath
     *
     * @param xpathProperties
     * @param element
     * @return
     */
    public static String textJoin(ReplenishXpathProperties xpathProperties, String element) {
        return xpathProperties.getConfigCommonTextJoinLeft() + element + xpathProperties.getConfigCommonTextJoinRight();
    }

    /**
     * 用于拼接common contains xpath
     *
     * @param xpathProperties
     * @param element
     * @return
     */
    public static String containsJoin(ReplenishXpathProperties xpathProperties, String element) {
        return xpathProperties.getConfigCommonContainsJoinLeft() + element + xpathProperties.getConfigCommonContainsJoinRight();
    }


}
